Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update optimizer param group strategy #7376

Merged
merged 2 commits into from
Apr 11, 2022
Merged

Update optimizer param group strategy #7376

merged 2 commits into from
Apr 11, 2022

Conversation

glenn-jocher
Copy link
Member

@glenn-jocher glenn-jocher commented Apr 11, 2022

Avoid empty lists on missing BathNorm2d models as in #7375

πŸ› οΈ PR Summary

Made with ❀️ by Ultralytics Actions

🌟 Summary

Refactor optimizer parameter grouping for increased clarity in train.py.

πŸ“Š Key Changes

  • Simplified the variable naming for optimizer parameter groups from g0, g1, g2 to a single list g.
  • Changed parameter group assignments within the optimizer initialization to refer to the new g list indices.
  • Updated the parameter group addition to the optimizer to match the new grouping method.
  • Clarified logging output to reflect these changes by adjusting the counts for each parameter group.

🎯 Purpose & Impact

  • Purpose: To streamline the readability and maintenance of the optimizer parameter grouping by using a single list with indices rather than separate variables.
  • Potential Impact: This change should make the code more maintainable and understandable for developers contributing to or reviewing the train.py script, without affecting the end users' experience or the functionality of the training process.

Avoid empty lists on missing BathNorm2d models as in #7375
@glenn-jocher glenn-jocher self-assigned this Apr 11, 2022
@glenn-jocher glenn-jocher merged commit bd2dda8 into master Apr 11, 2022
@glenn-jocher glenn-jocher deleted the update/pg branch April 11, 2022 10:34
BjarneKuehl pushed a commit to fhkiel-mlaip/yolov5 that referenced this pull request Aug 26, 2022
* Update optimizer param group strategy

Avoid empty lists on missing BathNorm2d models as in ultralytics#7375

* fix init
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant